import request from '@/utils/request'
const BASE_URL = '/well/data'

export function createOne(data){
  return request({
    url: BASE_URL,
    method: 'post',
    data: data
  })
}
/**
 * @deprecated 查询井列表
 * @param {*} query 
 * @returns 
 */
export function queryOne(id) {
  return request({
    url: BASE_URL + "/" + id,
    method: "get",
  });
}
export function queryList(query) {
  return request({
    url: BASE_URL,
    method: 'get',
    params: query
  })
}
// 删除井
export function deleteOne(id) {
  return request({
    url: BASE_URL + '/' + id,
    method: 'delete'
  })
}
// 修改井
export function updateOne(data) {
  return request({
    url: BASE_URL,
    method: 'put',
    data: data
  })
}


//构建选择树
export function buildTree(){
  return request({
    url: BASE_URL + '/tree',
    method: 'get',
    data:{}
  })
}